<h1>Productos</h1>

<% unless flash[:success].blank? %>
    <p><%= flash[:success] %></p>
<% end %>

<% unless flash[:fail].blank? %>
    <p><%= flash[:fail] %></p>
<% end %>

<p>
  <%= link_to "Importar productos", admin_import_products_url %>
</p>

<div class="search-box">
    <div class="container">
        <% form_tag admin_product_search_url, :method => 'get', :class => 'pull-right' do %>
            <div class="form-group">
                <%= text_field_tag :keywords,'', :class => 'form-control', :style => "width: 0px; padding-left: 0px; padding-right: 0px; border-width: 0px;", :placeholder => 'Buscar...', :autocomplete => 'off' %>
            </div>
            <button type="submit">
                <i class="fa fa-search"></i>
            </button>
        <% end %>
    </div>
</div>

<%= render :partial => 'product_list', :locals => { :products => @products } %>


<p><%= link_to 'Crear Producto', new_admin_product_url %></p>